package org.budo.spring.session.redis.repository;

import org.budo.jdbc.dao.BudoJdbcDao;
import org.springframework.session.Session;
import org.springframework.session.SessionRepository;

/**
 * @author lmw
 */
public abstract class AbstractBudoSpringSessionRedisRepository implements SessionRepository<Session> {
    protected static final String KEYS_SQL = "SELECT KEYS(?)";

    protected static final String GET_SQL = "SELECT GET(?)";

    protected static final String SET_SQL = "SELECT SET(?, ?)";

    protected static final String EXPIRE_SQL = "SELECT EXPIRE(?, ?)";

    protected static final String DEL_SQL = "SELECT DEL(?)";

    private BudoJdbcDao budoJdbcDao;

    private String sessionIdPrefix;

    public String getSessionIdPrefix() {
        return this.sessionIdPrefix;
    }

    public void setSessionIdPrefix(String sessionIdPrefix) {
        this.sessionIdPrefix = sessionIdPrefix;
    }

    public BudoJdbcDao getBudoJdbcDao() {
        return budoJdbcDao;
    }

    public void setBudoJdbcDao(BudoJdbcDao budoJdbcDao) {
        this.budoJdbcDao = budoJdbcDao;
    }
}